package cn.tedu.store.commons.pojo.product.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 添加属性模板的DTO类
 *
 * @author RelentlessFlow
 * @version 0.0.1
 */
@Data
public class AttributeTemplateAddNewDTO implements Serializable {

    /**
     * 属性模板名称
     */
    @ApiModelProperty(value = "属性模板名称", required = true, example = "狗狗用品")
    @NotNull(message = "必须填写名称")
    private String name;

    /**
     * 属性模板名称的拼音
     */
    @ApiModelProperty(value = "属性模板名称的拼音", required = true, example = "gougouyongpin")
    @NotNull(message = "必须填写拼音")
    private String pinyin;

    /**
     * 关键词列表，各关键词使用英文的逗号分隔
     */
    @ApiModelProperty(value = "关键词列表", required = true, example = "高蛋白,营养")
    @NotNull(message = "必须填写关键词列表")
    private String keywords;

    /**
     * 自定义排序序号
     */
    @ApiModelProperty(value = "自定义排序序号", required = true, example = "25")
    @NotNull(message = "必须填写排序序号")
    @Range(min = 1,max = 255,message = "必须在[1,255]区间内")
    private Integer sort;

}
